silencedb = -25
mindip = 2
showtext = 1
minpause = 0.3
Read from file... /home/dileepa/Desktop/FYP_Elicitor/elicitor/clip5.wav
soundname$ = selected$("Sound")
soundid = selected("Sound")
originaldur = Get total duration
bt = Get starting time
To Intensity... 50 0 yes
intid = selected("Intensity")
start = Get time from frame number... 1
nframes = Get number of frames
end = Get time from frame number... 'nframes'
minint = Get minimum... 0 0 Parabolic
maxint = Get maximum... 0 0 Parabolic
max99int = Get quantile... 0 0 0.99
threshold = max99int + silencedb
threshold2 = maxint - max99int
threshold3 = silencedb - threshold2
if threshold < minint
threshold = minint
endif
To TextGrid (silences)... threshold3 minpause 0.1 silent sounding
textgridid = selected("TextGrid")
silencetierid = Extract tier... 1
silencetableid = Down to TableOfReal... sounding
nsounding = Get number of rows
npauses = 'nsounding'
speakingtot = 0
for ipause from 1 to npauses
beginsound = Get value... 'ipause' 1
endsound = Get value... 'ipause' 2
speakingdur = 'endsound' - 'beginsound'
speakingtot = 'speakingdur' + 'speakingtot'
endfor
select 'intid'
Down to Matrix
matid = selected("Matrix")
To Sound (slice)... 1
sndintid = selected("Sound")
intdur = Get total duration
intmax = Get maximum... 0 0 Parabolic
To PointProcess (extrema)... Left yes no Sinc70
ppid = selected("PointProcess")
numpeaks = Get number of points
for i from 1 to numpeaks
t'i' = Get time from index... 'i'
endfor
select 'sndintid'
peakcount = 0
for i from 1 to numpeaks
value = Get value at time... t'i' Cubic
if value > threshold
peakcount += 1
int'peakcount' = value
timepeaks'peakcount' = t'i'
endif
endfor
select 'intid'
validpeakcount = 0
currenttime = timepeaks1
currentint = int1
for p to peakcount-1
following = p + 1
followingtime = timepeaks'following'
dip = Get minimum... 'currenttime' 'followingtime' None
diffint = abs(currentint - dip)
if diffint > mindip
validpeakcount += 1
validtime'validpeakcount' = timepeaks'p'
endif
currenttime = timepeaks'following'
currentint = Get value at time... timepeaks'following' Cubic
endfor
select 'soundid'
To Pitch (ac)... 0.02 30 4 no 0.03 0.25 0.01 0.35 0.25 450
pitchid = selected("Pitch")
voicedcount = 0
for i from 1 to validpeakcount
querytime = validtime'i'
select 'textgridid'
whichinterval = Get interval at time... 1 'querytime'
whichlabel$ = Get label of interval... 1 'whichinterval'
select 'pitchid'
value = Get value at time... 'querytime' Hertz Linear
if value <> undefined
if whichlabel$ = "sounding"
voicedcount = voicedcount + 1
voicedpeak'voicedcount' = validtime'i'
endif
endif
endfor
timecorrection = originaldur/intdur
if showtext > 0
select 'textgridid'
Insert point tier... 1 syllables
for i from 1 to voicedcount
position = voicedpeak'i' * timecorrection
Insert point... 1 position 'i'
endfor
endif
Read from file... /home/dileepa/Desktop/FYP_Elicitor/elicitor/clip5.wav
snd = selected("Sound")
pitch=To Pitch... 0 5 600
pitchMinimum=Get minimum... 0 0 Hertz Parabolic
pitchMaximum=Get maximum... 0 0 Hertz Parabolic
pitchQ1=Get quantile... 0 0 0.25 Hertz
pitchQ2=Get quantile... 0 0 0.5 Hertz
pitchQ3=Get quantile... 0 0 0.75 Hertz
pitchMean=Get mean... 0 0 Hertz
pitchStd=Get standard deviation... 0 0 Hertz
pit = selected ("Pitch")
select snd
plus pit
To PointProcess (cc)
jitter = Get jitter (ddp)... 0 0 0.0001 0.02 1.3
plus snd
shimmer = Get shimmer (dda)... 0 0 0.0001 0.02 1.3 1.6
Read from file... /home/dileepa/Desktop/FYP_Elicitor/elicitor/clip5.wav
snd = selected("Sound")
To Formant (burg)... 0 3 3500 0.025 50
meanf1 = Get mean... 1 0 0 Hertz
meanf2 = Get mean... 2 0 0 Hertz
meanf3 = Get mean... 3 0 0 Hertz
medianf1 = Get quantile... 1 0 0 Hertz 0.5
medianf2 = Get quantile... 2 0 0 Hertz 0.5
medianf3 = Get quantile... 3 0 0 Hertz 0.5
stdevf1 = Get standard deviation... 1 0 0 Hertz
stdevf2 = Get standard deviation... 2 0 0 Hertz
stdevf3 = Get standard deviation... 3 0 0 Hertz
Read from file... /home/dileepa/Desktop/FYP_Elicitor/elicitor/clip5.wav
snd = selected("Sound")
To Intensity... 70 0 yes
meanspl = Get mean... 0 0 energy
medianspl = Get quantile... 0 0 0.5
stdspl = Get standard deviation... 0 0
minspl = Get minimum... 0 0 Parabolic
maxspl = Get maximum... 0 0 Parabolic
select 'intid'
plus 'matid'
plus 'sndintid'
plus 'ppid'
plus 'pitchid'
plus 'silencetierid'
plus 'silencetableid'
Remove
if showtext < 1
select 'soundid'
plus 'textgridid'
Remove
endif
speakingrate = 'voicedcount'/'originaldur'
articulationrate = 'voicedcount'/'speakingtot'
npause = 'npauses'-1
asd = 'speakingtot'/'voicedcount'
y1 = 'meanf2'*'maxspl'*'stdspl'
y2 = 'pitchStd'*'stdspl'
y3 = 'stdevf2'*'medianf3'
y4 = 'pitchQ3'*'stdspl'
y5 = 'medianf3'*'stdspl'
echo 'articulationrate','pitchMinimum','pitchMaximum','pitchQ1','pitchQ2','pitchQ3','pitchMean','pitchStd','jitter','shimmer','meanf1','meanf2','meanf3','medianf1','medianf2','medianf3','stdevf1','stdevf2','stdevf3','meanspl','medianspl','stdspl','minspl','maxspl','y1','y2','y3','y4','y5'
